package com.tsystems.school.jabber.DataBase.Entities;

import com.sun.istack.internal.NotNull;

import javax.persistence.*;

/**
 * Created by IntelliJ IDEA.
 * User: Kirill
 * Date: 22.08.11
 * Time: 13:46
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table( name = "Admin" )
public class Admin extends ManagedEntity{


	@Column(name="name")
	@NotNull
	private String name;

	@ManyToOne(cascade= {CascadeType.REFRESH}, fetch=FetchType.EAGER)
    @JoinColumn(name="AccessLevel_id")
	private AccessLevel level;


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public AccessLevel getLevel() {
		return level;
	}

	public void setLevel(AccessLevel level) {
		this.level = level;
	}
}
